package com.hp.tiger.chapter15;

import java.util.stream.IntStream;

/**
 * @author XavierDong
 **/
public class PerThreadClient {


    public static void main(String[] args) {

        final MessageHandler messageHandler = new MessageHandler();
        IntStream.rangeClosed(0, 10)
                .forEach(i -> messageHandler.request(new Message(String.valueOf(i))));
        messageHandler.shutdown();
    }
}
